﻿@model VNWIKI_WEB.Models.DataList
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section title {
    @ViewData["albumName"] - @ViewData["catName"] | Chia sẻ hình ảnh đẹp - vnwiki.com
}
@section categoryList {
    @{foreach (var pt in Model.CatList)
      { 
        <li><a href="@Url.RouteUrl("CategoryView", new { catID = pt.ID })">@pt.Name</a>
        </li>
    } }
}
@section content {
    <div class="slider">
        <div class="border">
            <div class="info">
                <h2>
                    <strong>Album: <span style="color: #02a0cd">@ViewData["albumName"]</span></strong></h2>
                <span>Thể loại: <a href="@Url.Action("GetAlbumList", "Home", new {catID = ViewData["catID"] })">
                    <b>@ViewData["catName"]</b></a></span> <span style="margin-left: 20px;">Lượt xem: <b>@ViewData["views"]</b></span>
                <span style="float: right">
                    <!-- Place this tag where you want the +1 button to render. -->
                    <div class="g-plusone" data-size="tall" data-annotation="none" data-href="@Request.Url.AbsoluteUri.ToString()">
                    </div>
                    <!-- Place this tag after the last +1 button tag. -->
                    <script type="text/javascript">
                        (function () {
                            var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                            po.src = 'https://apis.google.com/js/plusone.js';
                            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
                        })();
                    </script>
                    <iframe src="//www.facebook.com/plugins/like.php?href=@Request.Url.AbsoluteUri.ToString()&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=segoe+ui&amp;height=24" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:24px;" allowTransparency="true">
                    </iframe>
                </span>
            </div>
            <div class="views black">
                <div class="images">
                    @{ int next = Convert.ToInt16(ViewData["index"]) + 1;
                               int prev = Convert.ToInt16(ViewData["index"]) - 1;
                               int photoNum = Convert.ToInt16(ViewData["photoNum"]);
                    }
                    <span id="page">Ảnh @next/@photoNum</span> <span class="prev">
                        @if (prev >= 0)
                                  {
                            <a href="@Url.RouteUrl("AlbumView", new { category_id = ViewContext.RouteData.Values["category_id"], album_id = ViewContext.RouteData.Values["album_id"], index = prev })">
                                <img src="../../images/left-arrow.png" /></a>

                                    
                                    }
                    </span><span class="next">
                        @if (next < photoNum)
                                      {
                            <a href="@Url.RouteUrl("AlbumView", new { category_id = ViewContext.RouteData.Values["category_id"], album_id = ViewContext.RouteData.Values["album_id"], index = next })">
                                <img src="../../images/right-arrow.png" /></a>            
                               }
                    </span>
                    <img src="../../images/@Model.Photo.Link" />
                </div>
            </div>
            <div class="page">
                <b style="margin-left: 5px; color: #000">TAGS: </b>
                @{foreach (var pt in Model.TagsList)
                              { 
                    <strong><a href="/Home/Search?key=@pt">@pt</a></strong>
                            } }
            </div>
            <div class="comment">
                <b>Bình luận</b><br />
                <div class="fb-comments" data-href="@Request.Url.AbsoluteUri.ToString()" data-num-posts="5" data-width="600">
                </div>
            </div>
        </div>
    </div>
    <div class="album-list">
    </div>
    <div id="fb-root">
    </div>
    <script type="text/javascript">
        (function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        } (document, 'script', 'facebook-jssdk'));
    </script>
}
